package com.jzg.jcptadmin.data.vo;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by jzg on 2015/12/28.
 */
public class ChooseBean  implements Parcelable{
    /**
     * Table : [{"Id":1,"Name":"易鑫"},{"Id":3,"Name":"自建"}]
     * msg :
     * status : 100
     */

    private String msg;
    private int status;
    /**
     * Id : 1
     * Name : 易鑫
     */

    private List<TableEntity> Table;

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public void setTable(List<TableEntity> Table) {
        this.Table = Table;
    }

    public String getMsg() {
        return msg;
    }

    public int getStatus() {
        return status;
    }

    public List<TableEntity> getTable() {
        return Table;
    }

    public static class TableEntity implements Parcelable{
        private int Id;
        private String Name;

        public void setId(int Id) {
            this.Id = Id;
        }

        public void setName(String Name) {
            this.Name = Name;
        }

        public int getId() {
            return Id;
        }

        public String getName() {
            return Name;
        }


        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.Id);
            dest.writeString(this.Name);
        }

        public TableEntity() {
        }

        protected TableEntity(Parcel in) {
            this.Id = in.readInt();
            this.Name = in.readString();
        }

        public static final Creator<TableEntity> CREATOR = new Creator<TableEntity>() {
            public TableEntity createFromParcel(Parcel source) {
                return new TableEntity(source);
            }

            public TableEntity[] newArray(int size) {
                return new TableEntity[size];
            }
        };
    }
  /*  private String chooseitem;//数据
    private String	sortLetters;	// 显示数据拼音的首字母

    public String getChooseitem() {
        return chooseitem;
    }

    public void setChooseitem(String chooseitem) {
        this.chooseitem = chooseitem;
    }

    public String getSortLetters() {
        return sortLetters;
    }

    public void setSortLetters(String sortLetters) {
        this.sortLetters = sortLetters;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.chooseitem);
        dest.writeString(this.sortLetters);
    }

    public ChooseBean() {
    }

    protected ChooseBean(Parcel in) {
        this.chooseitem = in.readString();
        this.sortLetters = in.readString();
    }

    public static final Creator<ChooseBean> CREATOR = new Creator<ChooseBean>() {
        public ChooseBean createFromParcel(Parcel source) {
            return new ChooseBean(source);
        }

        public ChooseBean[] newArray(int size) {
            return new ChooseBean[size];
        }
    };*/


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.msg);
        dest.writeInt(this.status);
        dest.writeList(this.Table);
    }

    public ChooseBean() {
    }

    protected ChooseBean(Parcel in) {
        this.msg = in.readString();
        this.status = in.readInt();
        this.Table = new ArrayList<TableEntity>();
        in.readList(this.Table, List.class.getClassLoader());
    }

    public static final Creator<ChooseBean> CREATOR = new Creator<ChooseBean>() {
        public ChooseBean createFromParcel(Parcel source) {
            return new ChooseBean(source);
        }

        public ChooseBean[] newArray(int size) {
            return new ChooseBean[size];
        }
    };
}
